import request from '@/utils/request'

// 查询城市列表（分页）
export function listCity(query) {
  return request({
    url: '/house/city/list',
    method: 'get',
    params: query
  })
}

// 查询城市列表（不分页，用于下拉选择）
export function listCityOptions(query) {
  return request({
    url: '/house/city/list',
    method: 'get',
    params: {
      ...query,
      pageSize: 999
    }
  })
}

// 查询城市详细
export function getCity(cityId) {
  return request({
    url: '/house/city/' + cityId,
    method: 'get'
  })
}

// 新增城市
export function addCity(data) {
  return request({
    url: '/house/city',
    method: 'post',
    data: data
  })
}

// 修改城市
export function updateCity(data) {
  return request({
    url: '/house/city',
    method: 'put',
    data: data
  })
}

// 删除城市
export function delCity(cityId) {
  return request({
    url: '/house/city/' + cityId,
    method: 'delete'
  })
}

// 查询省份列表
export function listProvince() {
  return request({
    url: '/house/province/list',
    method: 'get'
  })
} 